<html>
    <head>
        <meta charset="UTF-8">
        <link rel="stylesheet" href="https://cdn.staticfile.org/layui/2.6.8/css/layui.min.css"   />
        <link rel="stylesheet" href="../../res/css/mz.css" />
        <script src="https://cdn.staticfile.org/layui/2.6.8/layui.min.js" ></script>
        <script src="https://cdn.staticfile.org/vue/2.2.2/vue.min.js"></script>
        <script src="../../res/js/mz.view.js"></script>
        <script src="../../res/js/mz.common.js"></script>
        <style>
        </style>
    </head>
    <body>

        <div id="app" style=" margin: 10px; display: none;">

            <div v-for="field in fields" class="layui-row item">
                <div class="layui-col-sm4 title">
                    {{field.title}}
                </div>
                <div class="layui-col-sm8 desc">
                    {{entity[field.name] || ''}}
                </div>
            </div>

        </div>


        <script>

            var field_setting = [
                <#list fields as field>
                {title: '${field.title}', name: '${field.name}', type: '${field.type}'},
                </#list>
            ];

            //加载模块
            layui.use(['jquery'], function(){
                layui.$.get(base_url + '/${moduleName}_get/' + getQueryString('id'), function(res){
                    initVue({data: { fields: field_setting, entity :  res.content || {}  }});
                })
            });

        </script>

    </body>
</html>
